<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var s = ['php','mysql','java','html','javascript','css'];
    //document.write(s.length);

    //document.write(s.join("-"));

    var ss = "php-mysql-java-html-javascript-css".split('-');  //将字符串信息，根据 - 分隔为数组
    //document.write(ss.length);
    ss.forEach(function(e){
        document.write(e+"<br>");
    })
</script>
</body>
</html>